﻿@using Ext.Net
@using Ext.Net.MVC
@model Doan.Website.Models.ChangePasswordModel
@{
    ViewBag.Title = "Change Password";
    Layout = "~/Views/Shared/_Layout_Admin.cshtml";
}

@section Header
{

}
@section ToolbarSection{
    @Html.X().Button().Text("Lưu").ID("btnSave").Disabled(true).Icon(Icon.Disk).DirectEvents(de =>
                    {
                        de.Click.Url = Url.Action("ChangePassword");
                        de.Click.EventMask.ShowMask = true;
                        de.Click.FormID = "FormPanelChangePass";
                    })
    @Html.X().Button().Text("Quay lại").Icon(Icon.ArrowLeft).Margins("0 0 0 10").Listeners(ls => ls.Click.Handler = "window.parent.location.reload();parentAutoLoadControl.close();")
}

@Html.X().FormPanel().ID("FormPanelChangePass").Title("Change Password").StyleSpec("position: fixed; z-index: 10;width: 100%;").Listeners(
    ls => ls.ValidityChange.Handler = "App.btnSave.setDisabled(!valid)").Items(
        Html.X().TextFieldFor(m => m.OldPassword).InputType(Ext.Net.InputType.Password).FieldLabel("Mạt khẩu cũ").LabelWidth(130).Width(500).StyleSpec("margin: 30px;"),
        Html.X().TextFieldFor(m => m.NewPassword).InputType(Ext.Net.InputType.Password).FieldLabel("Mật khẩu mới").LabelWidth(130).Width(500).StyleSpec("margin: 30px;"),
        Html.X().TextFieldFor(m => m.ConfirmPassword).InputType(Ext.Net.InputType.Password).FieldLabel("Nhập lại mật khẩu").LabelWidth(130).Width(500).StyleSpec("margin: 30px;")
    )